package lab02.test36;

public class Postgraduate extends Student{

    public Postgraduate(String name) {
        super(name);
        dept = "研究生";
    }

    @Override
    public void graderank() {
        int sum = 0;

        for(int i = 0; i < courseNum;i++){
            sum += coursesgrade[i];
        }

        aver = sum / courseNum;

        if(aver >= 90 && aver <= 100){
            gradeRank = "优秀";
        }else if(aver >= 80){
            gradeRank = "良好";
        }else if(aver >= 70){
            gradeRank = "一般";
        }else if(aver >= 60){
            gradeRank = "及格";
        }else gradeRank = "不及格";

    }
}
